﻿using AB.ServiceDirectory.Commons;
using AB.ServiceDirectory.Dao;
using AB.ServiceDirectory.Entities;

namespace AB.ServiceDirectory.BO
{
    /// <summary>
    /// AccountBO
    /// </summary>
    public static class AccountBO
    {
        /// <summary>
        /// Validates the user.
        /// </summary>
        /// <param name="account">The account.</param>
        /// <param name="password">The password.</param>
        /// <returns></returns>
        public static ValidateUserResult ValidateUser(string account, string password)
        {
            return UserDao.ValidateUser(account, password);
        }

        /// <summary>
        /// Gets the name of the user by account.
        /// </summary>
        /// <param name="account">The account.</param>
        /// <returns></returns>
        public static User GetUserByAccountName(string account)
        {
            return UserDao.GetUserByAccountName(account);
        }
    }
}